<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="h" uri="/hd-tags"%>
    
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>回访单</title>
<script type="text/javascript" src="js/datepicker/WdatePicker.js"></script>
<script type="text/javascript" src="js/jquery-1.2.6.js"></script>

<link href="style/main.css" rel="stylesheet" type="text/css"/>
<link href="style/glowtabs.css" rel="stylesheet" type="text/css" />
</head>

<body class="body_content">
<div id="wrap">
	<div id="main" class="clearfix">
	
<jsp:include page="../header.jsp"></jsp:include>


<div class="ricoh_content_k">
  <div class="ricoh_content_in" style="padding-left:38px;">
     <div class="searchmore">
         <div class="searchmoretop"></div>
          <div class="fr searchmoreright"></div>
          <div class="fl searchmoreleft"></div>
          <div class="fl searchmoretitle">回访单</div>
          
          <form action="visit_saveReturnRecord.action" method="post" onsubmit="return validation();">
          
	          <div style="padding-top:30px;_padding-top:3px;padding-left:30px;">
	          
	          		<div class="inform_guest_k">
	          			 <div class="inform_guest" style="width:28%">
		                	  <label>客户名：</label>
		                          <s:select list="customers" name="returnRecord.unitName" id="unitName" listKey="unitName" listValue="%{unitName}" headerKey="" headerValue="请选择客户" theme="simple"></s:select>
	                     </div>
	                     
	          			<div class="inform_guest" style="width:28%">
		                      <label>联系人：</label>
		                        <input type="text" name="returnRecord.contactor" id="contactor" maxlength="25"/>
	                    </div>
	                    
	                    <div class="inform_guest" style="width:28%">
		                      <label>联系方式：</label>
		                        <input type="text" name="returnRecord.contactWay" id="contactWay" maxlength="25"/>
	                    </div>
	                	
	                </div>
	                
	            	<div class="inform_guest_k">
	                	<div class="inform_guest" style="width:28%">
		                	  <label>使用机型：</label>
		                        <s:select list="machines" name="returnRecord.machineModel" id="machineModel" listKey="machineId" listValue="%{machineModel}" headerKey="" headerValue="请选择机型" theme="simple"></s:select>
	                     </div>
	                     
	                     <div class="inform_guest" style="width:28%">
		                      <label>本次维修人：</label>
		                        <s:select list="maintenanceMen" name="returnRecord.thisTimeRepairman" id="thisTimeRepairman" listKey="name" listValue="%{name}" headerKey="" headerValue="请选择" theme="simple"></s:select>
	                    </div>
	            	</div>
	            	
	            	<div class="inform_guest_k">
	                	<div class="inform_guest" style="width:28%;">
	                	  <label style="width:7em;">维修时间：</label>
		                	  <input name="thisTimeRepairDate" type="text" id="thisTimeRepairDate" class="Wdate" onclick="WdatePicker()" readonly="readonly" size="21"
								onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',alwaysUseStartDate:true})"></input>
	                     </div>
	                     <div class="inform_guest" style="width:28%">
	                      <label style="width:7em;">维修内容：</label>
	                      	  <select name="returnRecord.thisTimeContent" id="thisTimeContent">
	                       		<option value="">请选择</option>
		                	    <option value="1">定期保养</option>
		                	    <option value="2">修理</option>
		                	    <option value="3">定期修理</option>
		                	    <option value="4">继续作业</option>
		                	    <option value="5">零件更换</option>
		                	    <option value="6">炭粉更换</option>
		                	    <option value="7">说明</option>
		                	    <option value="8">合同</option>
		                	    <option value="9">机器安装</option>
		                	    <option value="10">搬回修理</option>
		                	    <option value="11">送货</option>
		                	    <option value="12">其它</option>
		   	                  </select>
	                    </div>
	                    
	                    <div class="inform_guest" style="width:28%">
	                      <label>上次维修人：</label>
		                        <s:select list="maintenanceMen" name="returnRecord.lastTimeRepairman" id="lastTimeRepairman" listKey="name" listValue="%{name}" headerKey="" headerValue="请选择" theme="simple"></s:select>
	                    </div>
	            	</div>
	            	
	            	<div class="inform_guest_k"></div>
	            	
	           		<div class="inform_guest_k">
		           	  	<div class="inform_guest" style="width:40%">
		                      <label style="width:12em;">维修保养后设备使用状况：</label>
		                      <input type="radio" name="appraisal.appraiseEffect" class="appraiseEffect" value="0" style="border:none"/><label style="width:2em; text-align:left">好</label>
		                      <input type="radio" name="appraisal.appraiseEffect" class="appraiseEffect" value="1" style="border:none"/><label style="width:2em; text-align:left">一般</label>
		                      <input type="radio" name="appraisal.appraiseEffect" class="appraiseEffect" value="3" style="border:none"/><label style="width:2em; text-align:left">不好</label>
						</div>
					</div>
					
					<div class="inform_guest_k">	
						<div class="inform_guest" style="width:40%">
		                      <label style="width:12em;">是否更换零配件：</label>
		                      <input type="radio" name="returnRecord.isReplacePart" class="isReplacePart" value="0" style="border:none"/><label style="width:2em; text-align:left">是</label>
		                      <input type="radio" name="returnRecord.isReplacePart" class="isReplacePart" value="1" style="border:none"/><label style="width:2em; text-align:left">否</label>
						</div>
						
						<div class="inform_guest" style="width:40%">
		                      <label style="width:12em;">是否更换炭粉：</label>
		                      <input type="radio" value="0" name="returnRecord.isReplaceCarbonPowder" class="isReplaceCarbonPowder" style="border:none"/><label style="width:2em; text-align:left">是</label>
		                      <input type="radio" value="1" name="returnRecord.isReplaceCarbonPowder" class="isReplaceCarbonPowder" style="border:none"/><label style="width:2em; text-align:left">否</label>
						</div>
						
						
	                </div>
	                
		            <div class="inform_guest_k">
		           	  <div class="inform_guest" style="width:40%">
		           	    <label style="width:12em;">维修技术：</label>
		           	    	<input type="radio" name="appraisal.appraiseTechnic" class="appraiseTechnic" value="0" style="border:none"/><label style="width:2em; text-align:left">好</label>
		                    <input type="radio" name="appraisal.appraiseTechnic" class="appraiseTechnic" value="1" style="border:none"/><label style="width:2em; text-align:left">一般</label>
		                    <input type="radio" name="appraisal.appraiseTechnic" class="appraiseTechnic" value="3" style="border:none"/><label style="width:2em; text-align:left">不好</label>
		           	  </div>
		           	  
		              <div class="inform_guest" style="width:40%">
		                 <label style="width:12em;">服务态度：</label>
		                      <input type="radio" name="appraisal.appraiseAttitude" class="appraiseAttitude" value="0" style="border:none"/><label style="width:2em; text-align:left">好</label>
		                      <input type="radio" name="appraisal.appraiseAttitude" class="appraiseAttitude" value="1" style="border:none"/><label style="width:2em; text-align:left">一般</label>
		                      <input type="radio" name="appraisal.appraiseAttitude" class="appraiseAttitude" value="3" style="border:none"/><label style="width:2em; text-align:left">不好</label>
		              </div>
		            </div>
		        
		            <div class="inform_guest_k">
		           	  <div class="inform_guest" style="width:97%">
		           	    <label style="width:12em;">对我公司的建议：</label>
		                	  <input type="text" name="appraisal.advice" id="advice"  style="width:350px;" maxlength="100"/>
		         	  </div>
		            </div>
		            
		            <div class="inform_guest_k">
			          	<div class="inform_guest" style="width:25%;margin-left:100px">
			            	<input type="submit" value="保存" class="send_btn"/>
			            </div>	
			        </div>
	            
	                <div class="clear"></div>
	          </div>
           
         </form>
         
           
         <div class="clear searchmorebottom"></div>
         </div>
  </div>
</div>

</div>
</div>
<jsp:include page="../footer.jsp"></jsp:include>
</body>
<script type="text/javascript" src="js/ddtabmenu.js"></script>
<script type="text/javascript">
	ddtabmenu.definemenu("ddtabs2", 3);

	$(document).ready(function(){
		if(${statusTemp} == true){
			alert("添加成功");
		}

	});

	function validation(){
		if($("#unitName").val() == ""){
			alert("请选择客户名");
			return false;
		}else if($("#contactor").val() == ""){
			alert("请填写联系人");
			return false;
		}else if($("#contactWay").val() == ""){
			alert("请填写联系方式");
			return false;
		}else if($("#machineModel").val() == ""){
			alert("请选择使用机型");
			return false;
		}else if($("#thisTimeRepairman").val() == ""){
			alert("请选择本次维修人");
			return false;
		}else if($("#thisTimeRepairDate").val() == ""){
			alert("请选择维修时间");
			return false;
		}else if($("#thisTimeContent").val() == ""){
			alert("请选择上次维修内容");
			return false;
		}else if($("#lastTimeRepairman").val() == ""){
			alert("请选择上次维修人");
			return false;
		}else if($(".appraiseEffect[checked]") < 1){
			alert("请选择维修后设备使用情况");
			return false;
		}else if($(".isReplacePart[checked]").size() < 1){
			alert("请选择是否更换零件");
			return false;
		}else if($(".isReplaceCarbonPowder[checked]").size() < 1){
			alert("请选择是否更换炭粉");
			return false;
		}else if($(".appraiseTechnic[checked]").size() < 1){
			alert("请评价维修技术");
			return false;
		}else if($(".appraiseAttitude[checked]").size() < 1){
			alert("请选择服务态度");
			return false;
		}else if($("#advice").val() == ""){
			alert("请填写对我公司的建议");
			return false;
		}else{
			return true;
		}
	}
</script>
</html>
